﻿/**
 * @file		ct_dd_ipcu.c
 * @brief		IPCU driver Component Test
 * @note		None
 * @attention	None
 * 
 * <B><I>Copyright 2016 Socionext Inc.</I></B>
 */

#include <stdlib.h>
#include <string.h>
#include "driver_common.h"
#include "ct_dd_ipcu.h"
#include "dd_ipcu.h"
#include "arm.h"

/*----------------------------------------------------------------------*/
/* Definition															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Enumeration															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Structure															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Global Data															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Method Definition												*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Function														*/
/*----------------------------------------------------------------------*/
static VOID ct_dd_ipcu_ack_callback(UINT32 ch);
static VOID ct_dd_ipcu_req_callback(UINT32 ch);

/**
IPCU ACK callback function.
*/
static VOID ct_dd_ipcu_ack_callback(UINT32 ch)
{
	int		loop;
	ULONG	mba = 0;
	ULONG	mba_num;
	ULONG	ack_stat = 0;
	ULONG	data;
	
	Ddim_Print(("IPCU ACK Callback : ch=%d\n", ch));
	
	// Get Mail Box Number.
	Dd_IPCU_Get_MB_Adr(ch, &mba);
	mba_num = (mba - 0x100) >> 7;
	
	Ddim_Print(("  Mailbox data :\n"));
	for (loop = 0; loop < D_DD_IPCU_MB_DATA_TOTAL_NUM; loop++) {
		Dd_IPCU_Get_MB_Data(mba_num, loop, &data);
		Ddim_Print(("   Data[%d] = 0x%08x\n", loop, data));
	}
	
	// Read acknowlegde status.
	Dd_IPCU_Get_MB_Ack_Stat(mba_num, &ack_stat);
	// Clear acknowlegde.
	Dd_IPCU_Clr_MB_Ack(mba_num, ack_stat);
	
	// Release Mail Box.
	Dd_IPCU_Set_MB_Src(mba_num, 0);
	
	// Clear Data Register.
	for (loop = 0; loop < D_DD_IPCU_MB_DATA_TOTAL_NUM; loop++) {
		Dd_IPCU_Set_MB_Data(mba_num, loop, 0);
	}
}

/**
IPCU Request callback function.
*/
static VOID ct_dd_ipcu_req_callback(UINT32 ch)
{
	ULONG	mba = 0;
	ULONG	mba_num;
	ULONG	mode = E_DD_IPCU_MB_MODE_MAX;
	
	Ddim_Print(("IPCU Request Callback : ch=%d\n", ch));
	
	// Get Mailbox Number.
	Dd_IPCU_Get_MB_Adr(ch, &mba);
	mba_num = ( mba - 0x100 ) >> 7;
	
	// Clear destination.
	Dd_IPCU_Clr_MB_Dst_Unit(mba_num, ch);
	
	// Get mode.
	Dd_IPCU_Get_MB_Mode(mba_num, &mode);
	// manual mode.
	if ((mode == E_DD_IPCU_MB_MODE_MANUAL_1) || (mode == E_DD_IPCU_MB_MODE_MANUAL_2)) {
		// Ack
		Dd_IPCU_Set_MB_Ack_Unit(mba_num, ch);
	}
}

/*----------------------------------------------------------------------*/
/* Global Function														*/
/*----------------------------------------------------------------------*/
/**
 * @brief  Command main function for IPCU test.
 * @param  int argc	:The number of parameters
 *		   char** argv	:The value of parameters
 * @return VOID
 */                                      
VOID Ct_Dd_Ipcu_Main(int argc, char** argv)
{
	INT32				ret;
	int					param2;
	int					param3;
	int					param4;
	int					loop;
	T_DD_IPCU_MNG		ctrl;
	ULONG				int_stat = 0;
	ULONG				mbadr = 0;
	ULONG				src = 0;
	ULONG				mode = 0;
	ULONG				send = 0;
	ULONG				dst = 0;
	ULONG				msk = 0;
	ULONG				ack = 0;
	ULONG				data = 0;
	ULONG				status = 0;
	
	if(strcmp(argv[1], "ctrl") == 0){
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			
			// get 4th paramter.
			param4 = atoi(argv[4]);
			if (param4 == 0) {
				// set control data.
				ctrl.mode			= E_DD_IPCU_MB_MODE_MANUAL_1;
				ctrl.src_ch_num		= 12;
				ctrl.dst_ch_num		= 13;
				ctrl.mask_ch_num	= 15;
				ctrl.send_data[0]	= 0x00000010;
				ctrl.send_data[1]	= 0x00000011;
				ctrl.send_data[2]	= 0x00000012;
				ctrl.send_data[3]	= 0x00000013;
				ctrl.send_data[4]	= 0x00000014;
				ctrl.send_data[5]	= 0x00000015;
				ctrl.send_data[6]	= 0x00000016;
				ctrl.send_data[7]	= 0x00000017;
				ctrl.send_data[8]	= 0x00000018;
				ctrl.data_size		= 9;
				ctrl.ack_func		= ct_dd_ipcu_ack_callback;
				ctrl.req_func		= ct_dd_ipcu_req_callback;
				
				// Set Control.
				ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Ctrl : OK\n"));
					// register data output.
					Ddim_Print(("--- IPCU Register ---\n"));
					Ddim_Print(("MAILBOX[%d].SRC     : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
					Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
					Ddim_Print(("MAILBOX[%d].MASKSET : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
					Ddim_Print(("MAILBOX[%d].MODE    : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MODE.word));
					for (loop = 0; loop < 9; loop++) {
						Ddim_Print(("MAILBOX[%d].DATA[%d] : 0x%08x\n", param3, loop, IO_IPCU1.MAILBOX[param3].DATA[loop]));
					}
					Ddim_Print(("--------------------\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
				}
			}
			else if (param4 == 1) {
				// set control data.
				ctrl.mode			= E_DD_IPCU_MB_MODE_AUTO_ACK_1;
				ctrl.src_ch_num		= 14;
				ctrl.dst_ch_num		= 15;
				ctrl.mask_ch_num	= 12;
				ctrl.send_data[0]	= 0x00000020;
				ctrl.send_data[1]	= 0x00000021;
				ctrl.send_data[2]	= 0x00000022;
				ctrl.send_data[3]	= 0x00000023;
				ctrl.send_data[4]	= 0x00000024;
				ctrl.send_data[5]	= 0x00000025;
				ctrl.send_data[6]	= 0x00000026;
				ctrl.send_data[7]	= 0x00000027;
				ctrl.send_data[8]	= 0x00000028;
				ctrl.data_size		= 36;
				ctrl.ack_func		= ct_dd_ipcu_ack_callback;
				ctrl.req_func		= ct_dd_ipcu_req_callback;
				
				// Set Control.
				ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Ctrl : OK\n"));
					// register data output.
					Ddim_Print(("--- IPCU Register ---\n"));
					Ddim_Print(("MAILBOX[%d].SRC     : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
					Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
					Ddim_Print(("MAILBOX[%d].MASKSET : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
					Ddim_Print(("MAILBOX[%d].MODE    : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MODE.word));
					for (loop = 0; loop < 9; loop++) {
						Ddim_Print(("MAILBOX[%d].DATA[%d] : 0x%08x\n", param3, loop, IO_IPCU1.MAILBOX[param3].DATA[loop]));
					}
					Ddim_Print(("--------------------\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
				}
			}
			else {
				Ddim_Print(("please check 4th parameter!!\n"));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			
			memset(&ctrl, 0, sizeof(T_DD_IPCU_MNG));
			
			// Get Control.
			ret = Dd_IPCU_Get_Ctrl((UCHAR)param3, &ctrl);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_Ctrl : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SRC     : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].MASKSET : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MODE    : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MODE.word));
				for (loop = 0; loop < 9; loop++) {
					Ddim_Print(("MAILBOX[%d].DATA[%d] : 0x%08x\n", param3, loop, IO_IPCU1.MAILBOX[param3].DATA[loop]));
				}
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("IPCU ID           = %d\n", param3));
				Ddim_Print(("ctrl.mode         = %d\n", ctrl.mode));
				Ddim_Print(("ctrl.src_ch_num   = %d\n", ctrl.src_ch_num));
				Ddim_Print(("ctrl.dst_ch_num   = 0x%08x\n", ctrl.dst_ch_num));
				Ddim_Print(("ctrl.mask_ch_num  = 0x%08x\n", ctrl.mask_ch_num));
				for (loop = 0; loop < 9; loop++) {
					Ddim_Print(("ctrl.send_data[%d] = 0x%08x\n", loop, ctrl.send_data[loop]));
				}
				Ddim_Print(("ctrl.data_size    = %d\n", ctrl.data_size));
				Ddim_Print(("ctrl.ack_func     = 0x%08x\n", ctrl.ack_func));
				Ddim_Print(("ctrl.req_func     = 0x%08x\n", ctrl.req_func));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_Ctrl : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			param3 = atoi(argv[3]);
			
			memset(&ctrl, 0, sizeof(T_DD_IPCU_MNG));
			
			switch (param3) {
				case 0:
					ret = Dd_IPCU_Ctrl((UCHAR)param3, NULL);
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				case 1:
					ctrl.data_size	= 37;
					ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				case 2:
					ctrl.src_ch_num		= D_DD_IPCU_INT_MAX + 1;
					ctrl.dst_ch_num		= 0;
					ctrl.mask_ch_num	= 0;
					ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				case 3:
					ctrl.src_ch_num		= 0;
					ctrl.dst_ch_num		= D_DD_IPCU_INT_MAX + 1;
					ctrl.mask_ch_num	= 0;
					ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				case 4:
					ctrl.src_ch_num		= 0;
					ctrl.dst_ch_num		= 0;
					ctrl.mask_ch_num	= D_DD_IPCU_INT_MAX + 1;
					ret = Dd_IPCU_Ctrl((UCHAR)param3, &ctrl);
					Ddim_Print(("Dd_IPCU_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				case 5:
					ret = Dd_IPCU_Get_Ctrl((UCHAR)param3, NULL);
					Ddim_Print(("Dd_IPCU_Get_Ctrl : NG  ret=0x%08x\n", ret));
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					break;
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "cb") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		// get 4th paramter.
		param4 = atoi(argv[4]);
		
		if(strcmp(argv[2], "ack") == 0){
			if (param4 == 0) {
				ret = Dd_IPCU_Set_Ack_CB(param3, ct_dd_ipcu_ack_callback);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Set_Ack_CB : OK\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Set_Ack_CB : NG  ret=0x%08x\n", ret));
				}
			}
			else if (param4 == 1) {
				ret = Dd_IPCU_Set_Ack_CB(param3, NULL);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Set_Ack_CB : OK\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Set_Ack_CB : NG  ret=0x%08x\n", ret));
				}
			}
			else {
				Ddim_Print(("please check 4th parameter!!\n"));
			}
		}
		else if(strcmp(argv[2], "req") == 0){
			if (param4 == 0) {
				ret = Dd_IPCU_Set_Req_CB(param3, ct_dd_ipcu_req_callback);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Set_Req_CB : OK\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Set_Req_CB : NG  ret=0x%08x\n", ret));
				}
			}
			else if (param4 == 1) {
				ret = Dd_IPCU_Set_Req_CB(param3, NULL);
				if (ret == D_DDIM_OK) {
					Ddim_Print(("Dd_IPCU_Set_Req_CB : OK\n"));
				}
				else {
					Ddim_Print(("Dd_IPCU_Set_Req_CB : NG  ret=0x%08x\n", ret));
				}
			}
			else {
				Ddim_Print(("please check 4th parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "int") == 0){
		// get 2nd paramter.
		param2 = atoi(argv[2]);
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if (param3 == 0) {
			ret = Dd_IPCU_Get_Int_Stat(param2, &int_stat);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_Int_Stat : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("ISR[%d] : 0x%08x\n", param2, IO_IPCU1.ISR[param2 - 12].word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Ch       = %d\n", param2));
				Ddim_Print(("int_stat = 0x%08x\n", int_stat));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_Int_Stat : NG  ret=0x%08x\n", ret));
			}
		}
		else {
			ret = Dd_IPCU_Get_Int_Stat(param2, NULL);
			Ddim_Print(("Dd_IPCU_Get_Int_Stat : NG  ret=0x%08x\n", ret));
		}
	}
	else if(strcmp(argv[1], "int_mb") == 0){
		// get 2nd paramter.
		param2 = atoi(argv[2]);
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		// get 4th paramter.
		param4 = atoi(argv[4]);
		
		if (param4 == 0) {
			ret = Dd_IPCU_Get_Int_Stat_MB(param2, param3, &int_stat);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_Int_Stat_MB : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("ISR[%d] : 0x%08x\n", param2, IO_IPCU1.ISR[param2 - 12].word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Ch          = %d\n", param2));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("int_stat = 0x%08x\n", int_stat));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_Int_Stat_MB : NG  ret=0x%08x\n", ret));
			}
		}
		else {
			ret = Dd_IPCU_Get_Int_Stat_MB(param2, param3, NULL);
			Ddim_Print(("Dd_IPCU_Get_Int_Stat_MB : NG  ret=0x%08x\n", ret));
		}
	}
	else if(strcmp(argv[1], "mbadr") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "ack") == 0){
			ret = Dd_IPCU_Get_MB_Ack(param3, &mbadr);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MBADR[%d] : 0x%08x\n", param3, IO_IPCU1.MBADR[param3 - 12].word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Ch                    = %d\n", param3));
				Ddim_Print(("Mailbox Address - Ack = 0x%08x\n", mbadr));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack : NG  ret=0x%08x\n", ret));
			}
		}
		else if (strcmp(argv[2], "req") == 0) {
			ret = Dd_IPCU_Get_MB_Req(param3, &mbadr);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Req : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MBADR[%d] : 0x%08x\n", param3, IO_IPCU1.MBADR[param3 - 12].word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Ch                    = %d\n", param3));
				Ddim_Print(("Mailbox Address - Req = 0x%08x\n", mbadr));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Req : NG  ret=0x%08x\n", ret));
			}
		}
		else if (strcmp(argv[2], "adr") == 0) {
			ret = Dd_IPCU_Get_MB_Adr(param3, &mbadr);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Adr : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MBADR[%d] : 0x%08x\n", param3, IO_IPCU1.MBADR[param3 - 12].word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Ch                        = %d\n", param3));
				Ddim_Print(("Mailbox Address - Address = 0x%08x\n", mbadr));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Adr : NG  ret=0x%08x\n", ret));
			}
		}
		else if (strcmp(argv[2], "err") == 0) {
			if (param3 == 0) {
				ret = Dd_IPCU_Get_MB_Ack(12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				ret = Dd_IPCU_Get_MB_Req(12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Req : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 2) {
				ret = Dd_IPCU_Get_MB_Adr(12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Adr : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "src") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			src = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Set_MB_Src(param3, src);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Src : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SRC : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Src : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			ret = Dd_IPCU_Get_MB_Src(param3, &src);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Src : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SRC : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Source      = 0x%08x\n", src));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Src : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Get_MB_Src_Unit(param3, param4, &src);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Src_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SRC : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ch          = %d\n", param4));
				Ddim_Print(("Source      = %d\n", src));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Src_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				ret = Dd_IPCU_Get_MB_Src(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Src : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				ret = Dd_IPCU_Get_MB_Src_Unit(0, 12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Src_Unit : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "mode") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Set_MB_Mode(param3, (E_DD_IPCU_MB_MODE)param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Mode : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MODE : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MODE.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Mode : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Mode(param3, &mode);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Mode : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MODE : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MODE.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Mode        = %d\n", mode));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Mode : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				ret = Dd_IPCU_Get_MB_Mode(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Mode : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "send") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Set_MB_Send(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Send : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SEND : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SEND.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Send : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Send(param3, &send);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Send : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].SEND : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].SEND.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num  = %d\n", param3));
				Ddim_Print(("Send Trigger = %d\n", send));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Send : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Send(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Send : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				ret = Dd_IPCU_Get_MB_Send(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Send : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "dst") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			dst = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Set_MB_Dst(param3, dst);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Dst : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Send : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "set_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Set_MB_Dst_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Dst_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr") == 0){
			// get 4th paramter.
			dst = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Clr_MB_Dst(param3, dst);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Clr_MB_Dst_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Dst_Stat(param3, &dst);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Send : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num        = %d\n", param3));
				Ddim_Print(("Destination Status = 0x%08x\n", dst));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Send : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Get_MB_Dst_Stat_Unit(param3, param4, &dst);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Dst_Stat_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DSTSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSET.word));
				Ddim_Print(("MAILBOX[%d].DSTCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTCLR.word));
				Ddim_Print(("MAILBOX[%d].DSTSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].DSTSTAT.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num        = %d\n", param3));
				Ddim_Print(("Ch                 = %d\n", param4));
				Ddim_Print(("Destination Status = %d\n", dst));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Dst_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Dst(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Dst : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000001;
				ret = Dd_IPCU_Set_MB_Dst(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Dst : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 2) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Dst_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 3) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000001;
				ret = Dd_IPCU_Set_MB_Dst_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 4) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Dst(0, 0x00001000);
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 5) {
				IO_IPCU1.MAILBOX[0].DSTCLR.word = 0x00001000;
				ret = Dd_IPCU_Clr_MB_Dst(0, 0x00001000);
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 6) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Dst_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 7) {
				IO_IPCU1.MAILBOX[0].DSTCLR.word = 0x00001000;
				ret = Dd_IPCU_Clr_MB_Dst_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Dst_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 8) {
				ret = Dd_IPCU_Get_MB_Dst_Stat(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Dst_Stat : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 9) {
				ret = Dd_IPCU_Get_MB_Dst_Stat_Unit(0, 12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Dst_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "mask") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			msk = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Set_MB_Msk(param3, msk);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Msk : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Msk : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "set_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Set_MB_Msk_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Msk_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Msk_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr") == 0){
			// get 4th paramter.
			msk = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Clr_MB_Msk(param3, msk);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Clr_MB_Msk_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Msk_Stat(param3, &msk);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Mask Status = 0x%08x\n", msk));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Get_MB_Msk_Stat_Unit(param3, param4, &msk);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].MASKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSET.word));
				Ddim_Print(("MAILBOX[%d].MASKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKCLR.word));
				Ddim_Print(("MAILBOX[%d].MASKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].MASKSTAT.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ch          = %d\n", param4));
				Ddim_Print(("Mask Status = 0x%08x\n", msk));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Msk(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Msk : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000001;
				ret = Dd_IPCU_Set_MB_Msk(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Msk : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 2) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Msk_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Msk_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 3) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000001;
				ret = Dd_IPCU_Set_MB_Msk_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Msk_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 4) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Msk(0, 0x00001000);
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 5) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Msk_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Msk_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 6) {
				ret = Dd_IPCU_Get_MB_Msk_Stat(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 7) {
				ret = Dd_IPCU_Get_MB_Msk_Stat_Unit(0, 12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Msk_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "ack") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 4th paramter.
			ack = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Set_MB_Ack(param3, ack);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Ack : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Ack : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "set_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Set_MB_Ack_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Ack_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr") == 0){
			// get 4th paramter.
			ack = strtoul(argv[4], NULL, 16);
			
			ret = Dd_IPCU_Clr_MB_Ack(param3, ack);										/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "clr_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Clr_MB_Ack_Unit(param3, param4);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Ack_Stat(param3, &ack);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ack Status  = 0x%08x\n", ack));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Get_MB_Ack_Stat_Unit(param3, param4, &ack);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ch          = %d\n", param4));
				Ddim_Print(("Ack Status  = %d\n", ack));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "src") == 0){
			
			ret = Dd_IPCU_Get_MB_Ack_Src(param3, &ack);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ack Source  = 0x%08x\n", ack));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "src_unit") == 0){
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			ret = Dd_IPCU_Get_MB_Ack_Src_Unit(param3, param4, &ack);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src_Unit : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].ACKSET  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSET.word));
				Ddim_Print(("MAILBOX[%d].ACKCLR  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKCLR.word));
				Ddim_Print(("MAILBOX[%d].ACKSTAT : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSTAT.word));
				Ddim_Print(("MAILBOX[%d].ACKSRC  : 0x%08x\n", param3, IO_IPCU1.MAILBOX[param3].ACKSRC.word));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Ch          = %d\n", param4));
				Ddim_Print(("Ack Source  = %d\n", ack));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src_Unit : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "err") == 0){
			if (param3 == 0) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 1) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000000;
				ret = Dd_IPCU_Set_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 2) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_ACK_1;
				ret = Dd_IPCU_Set_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 3) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Set_MB_Ack_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 4) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000000;
				ret = Dd_IPCU_Set_MB_Ack_Unit(0, 0x00001000);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 5) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_ACK_1;
				ret = Dd_IPCU_Set_MB_Ack_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Set_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 6) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 7) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000000;
				ret = Dd_IPCU_Clr_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 8) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_CLEAR;
				ret = Dd_IPCU_Clr_MB_Ack(0, 0);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 9) {
				IO_IPCU1.MAILBOX[0].SRC.word = 0;
				ret = Dd_IPCU_Clr_MB_Ack_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 10) {
				IO_IPCU1.MAILBOX[0].SEND.word = 0x00000000;
				ret = Dd_IPCU_Clr_MB_Ack_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 11) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_CLEAR;
				ret = Dd_IPCU_Clr_MB_Ack_Unit(0, 12);
				Ddim_Print(("Dd_IPCU_Clr_MB_Ack_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 12) {
				ret = Dd_IPCU_Get_MB_Ack_Stat(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 13) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_CLEAR;
				ret = Dd_IPCU_Get_MB_Ack_Stat(0, &ack);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 14) {
				ret = Dd_IPCU_Get_MB_Ack_Stat_Unit(0, 12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 15) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_AUTO_CLEAR;
				ret = Dd_IPCU_Get_MB_Ack_Stat_Unit(0, 12, &ack);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Stat_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 16) {
				ret = Dd_IPCU_Get_MB_Ack_Src(0, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 17) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_MANUAL_1;
				ret = Dd_IPCU_Get_MB_Ack_Src(0, &ack);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 18) {
				ret = Dd_IPCU_Get_MB_Ack_Src_Unit(0, 12, NULL);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src_Unit : NG  ret=0x%08x\n", ret));
			}
			else if (param3 == 19) {
				IO_IPCU1.MAILBOX[0].MODE.bit.MODE = E_DD_IPCU_MB_MODE_MANUAL_1;
				ret = Dd_IPCU_Get_MB_Ack_Src_Unit(0, 12, &ack);
				Ddim_Print(("Dd_IPCU_Get_MB_Ack_Src_Unit : NG  ret=0x%08x\n", ret));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "data") == 0){
		// get 3rd paramter.
		param3 = atoi(argv[3]);
		// get 4th paramter.
		param4 = atoi(argv[4]);
		
		if(strcmp(argv[2], "set") == 0){
			// get 5th paramter.
			data = strtoul(argv[5], NULL, 16);

			ret = Dd_IPCU_Set_MB_Data(param3, param4, data);							/* pgr0539 */
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Set_MB_Data : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DATA[%d] : 0x%08x\n", param3, param4, IO_IPCU1.MAILBOX[param3].DATA[param4]));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Set_MB_Data : NG  ret=0x%08x\n", ret));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			
			ret = Dd_IPCU_Get_MB_Data(param3, param4, &data);
			if (ret == D_DDIM_OK) {
				Ddim_Print(("Dd_IPCU_Get_MB_Data : OK\n"));
				// register data output.
				Ddim_Print(("--- IPCU Register ---\n"));
				Ddim_Print(("MAILBOX[%d].DATA[%d] : 0x%08x\n", param3, param4, IO_IPCU1.MAILBOX[param3].DATA[param4]));
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("Mailbox num = %d\n", param3));
				Ddim_Print(("Data Num    = %d\n", param4));
				Ddim_Print(("Data        = 0x%08x\n", data));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("Dd_IPCU_Get_MB_Data : NG  ret=0x%08x\n", ret));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "state") == 0){
		ret = Dd_IPCU_Get_MB_Stat(&status);
		if (ret == D_DDIM_OK) {
			Ddim_Print(("Dd_IPCU_Get_MB_Stat : OK\n"));
			// register data output.
			Ddim_Print(("--- IPCU Register ---\n"));
			Ddim_Print(("MBSTAT : 0x%08x\n", IO_IPCU1.MBSTAT.word));
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("MailBox status = 0x%08x\n", status));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("Dd_IPCU_Get_MB_Stat : NG  ret=0x%08x\n", ret));
		}
	}
	else if(strcmp(argv[1], "state_mb") == 0){
		// get 2rd paramter.
		param2 = atoi(argv[2]);
		
		ret = Dd_IPCU_Get_MB_Stat_MB(param2, &status);
		if (ret == D_DDIM_OK) {
			Ddim_Print(("Dd_IPCU_Get_MB_Stat_MB : OK\n"));
			// register data output.
			Ddim_Print(("--- IPCU Register ---\n"));
			Ddim_Print(("MBSTAT : 0x%08x\n", IO_IPCU1.MBSTAT.word));
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("MailBox status = %d\n", status));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("Dd_IPCU_Get_MB_Stat_MB : NG  ret=0x%08x\n", ret));
		}
	}
	else if(strcmp(argv[1], "state_err") == 0){
		// get 2rd paramter.
		param2 = atoi(argv[2]);
		
		if (param2 == 0) {
			ret = Dd_IPCU_Get_MB_Stat(NULL);
			Ddim_Print(("Dd_IPCU_Get_MB_Stat : NG  ret=0x%08x\n", ret));
		}
		else if (param2 == 1) {
			ret = Dd_IPCU_Get_MB_Stat_MB(0, NULL);
			Ddim_Print(("Dd_IPCU_Get_MB_Stat_MB : NG  ret=0x%08x\n", ret));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "cmd") == 0) {
		ULONG cmd_param0 = strtoul(argv[2], NULL, 16);
		ULONG cmd_param1 = strtoul(argv[3], NULL, 16);
		ULONG cmd_param2 = strtoul(argv[4], NULL, 16);
		ULONG cmd_param3 = strtoul(argv[5], NULL, 16);
		ULONG cmd_param4 = strtoul(argv[6], NULL, 16);
		ULONG cmd_param5 = strtoul(argv[7], NULL, 16);
		ULONG cmd_param6 = strtoul(argv[8], NULL, 16);
		ULONG cmd_param7 = strtoul(argv[9], NULL, 16);
		ULONG cmd_param8 = strtoul(argv[10], NULL, 16);
		
		// Set SRC : ch14
		Dd_IPCU_Set_MB_Src(6, 0x4000);
		// Set DST : ch15
		Dd_IPCU_Set_MB_Dst(6, 0x8000);
		// Set Mode : Manual Mode2
		Dd_IPCU_Set_MB_Mode(6, 1);
		
		// Set Send Data
		Dd_IPCU_Set_MB_Data(6, 0, cmd_param0);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 1, cmd_param1);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 2, cmd_param2);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 3, cmd_param3);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 4, cmd_param4);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 5, cmd_param5);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 6, cmd_param6);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 7, cmd_param7);											/* pgr0539 */
		Dd_IPCU_Set_MB_Data(6, 8, cmd_param8);											/* pgr0539 */
		
		// Send
		Dd_IPCU_Set_MB_Send(6, 1);
	}
	else{
		Ddim_Print(("please check 1st parameter!!\n"));
	}
}
